package com.vincent.kdp.ui.vip.repository;

import com.loopj.android.http.RequestParams;
import com.vincent.baseapp.util.SPUtil;
import com.vincent.kdp.PostUrl;
import com.vincent.kdp.bean.RegisterVo;
import com.vincent.kdp.http.HttpUtil;
import com.vincent.kdp.http.RequestCallBack;
import com.vincent.kdp.ui.Constants;
import com.vincent.kdp.ui.bean.response.BaseOutput;
import com.vincent.kdp.ui.bean.response.RegisterOutPut;
import com.vincent.kdp.ui.bean.response.RegisterVipOutput;
import com.vincent.kdp.util.BaseParam;

public class RegisterRepository {


    /**
     *
     * @param vo 注册用户对象
     * @param callBack
     */
    public void reqRegister(RegisterVo vo,RequestCallBack callBack) {
        RequestParams params = new RequestParams();
        //params.put("consumeNum", consumptionNum);
        params.put("number", BaseParam.getDeviceId());
        params.put("birthday", vo.getBirth());
        params.put("name", vo.getName());
        params.put("gender", vo.getSex());//0：男，1：女
        params.put("phone", vo.getPhone());
        params.put("IDCard", vo.getCard());
        params.put("id", vo.getVip());
        params.put("email", vo.getMail());
        params.put("address", vo.getAddress());

        //0：男，1：女
        //params.put("departId", SPUtil.getString(Constants.SPKeys.DEPART_ID));//登录业务员的departId

        HttpUtil.loadData(PostUrl.REGISTER_MEMBER, params, BaseOutput.class, callBack);
    }



}
